import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//main.js中
import animated from 'animate.css'
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(ElementUI);
Vue.use(dataV)
Vue.use(animated)

import api from "./util/api"
// 引入微信SDK
import cloudbase from "@cloudbase/js-sdk";
//初始化SDK实例
const wxApp = cloudbase.init({
  env: api.envid,
});

// 将微信实例引入Vue原型中
Vue.prototype.$wxApp = wxApp;

// 引入axios进行地址访问
import axios from 'axios';
Vue.prototype.$http = axios;

// 导入cookie文件
import cookie from './util/cookie'
Vue.prototype.cookie = cookie;

// 导入时间文件
import gettime from "./util/time";
Vue.prototype.gettime = gettime;

// 导入图片查看器
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Viewer.setDefaults({
  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
})

Vue.config.productionTip = false
// 路由跳转
Vue.prototype.$goRoute = function (index) {
  this.$router.push(index)
}

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
